package com.jack.payment.entity.generate.user;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.jack.payment.util.serializer.IsSettingSerializer;
import com.jack.payment.util.serializer.SensitiveSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "用户信息")
public class UserModel implements Serializable {
    @Schema(description = "用户id")
    private String id;

    @Schema(description = "用户邮箱")
    @JsonSerialize(using = SensitiveSerializer.class)
    private String email;
    @Schema(description = "用户手机号码")
    @JsonSerialize(using = SensitiveSerializer.class)
    private String phone;

    @Schema(description = "待验证的2fa 密钥")
    @JsonIgnore
    private String verifyTwoSecret;

    @Schema(description = "2fa密钥")
    @JsonSerialize(using = IsSettingSerializer.class)
    private String twoSecret;
    @Schema(description = "qq账号")
    @JsonSerialize(using = IsSettingSerializer.class)
    private String qqSecret;

    @Schema(description = "角色")
    private String role;
    @Schema(description = "用户密码")
    @JsonSerialize(using = IsSettingSerializer.class)
    private String pwd;
    @Schema(description = "密码盐")
    @JsonIgnore
    private String salt;

    @Schema(description = "是否启用")
    @JsonIgnore
    private String enable;
}
